<template>
  <div>
     <div class="config">
        <div class="back" onclick="window.history.go(-1)"><img src="../assets/images/back.png" alt=""></div>
        <p>团队消费奖励</p>
    </div>
     <div class="box"> 
            <div class="row">             
                <p>本月收益</p>
                <span>{{data.monthprice}}</span>               
            </div>
        <router-link to="/allIncome/teamXF">
            <div class="row last" >         
            <p>全部收益</p>
            <img src="../assets/images/gd.png" alt="" class="gengduo">
            <span>{{data.allprice}}</span>   
            </div>
        </router-link>  
     </div>
   


  </div>
</template>

<script>
export default {
    name: "teamXFReward",
    data() {
        return {
            data: {}
        };
    },
    beforeCreate() {
        document.getElementsByTagName("body")[0].style.background = "#5aa0c8";
    },
    mounted() {
        var qs = require("qs");
        this.axios({
            method: "post",
            url: `${this.siteUrl}/getCostTeamTotal`,
            data: qs.stringify({
                uid: localStorage.getItem("uid")
            })
        })
            .then(response => {
               
                if ((response.data.result == 200)) {
                    this.data = response.data.data;
                } else {
                    alert("请求失败");
                }
            })
            .catch(function(error) {
                console.log(error);
            });
    }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.box {
    width: 94%;
    margin-left: 3%;
    height: 120px;
    border-radius: 3px;
    background: #fff;
    margin-top: 40px;
    overflow: hidden;
}

.row {
    height: 50px;
    background: #fff;
    position: relative;
    border-bottom: 1px solid #f2f2f2;
    margin: 8px;
}
.box .last {
    border-bottom: none;
}

.row .gengduo {
    position: absolute;
    height: 12px;
    top: 19px;
    right: 5px;
}
.row span {
    position: absolute;
    height: 12px;
    top: 16px;
    right: 17px;
}

.row p {
    position: absolute;
    left: 10px;
    top: 13px;
    font-size: 14px;
}
</style>
